<template>
    <div id="dialog-container">
        <el-dialog v-dialogDrag 
            title="审核实验结论" append-to-body
            :visible.sync="dialogVisible" @close="$emit('update:show', false)" :before-close="handleClose" :show="show"
            :close-on-click-modal="false" width="700px">
            <el-form :model="form" :inline="true" size="small" label-width="110px">
                <el-row>
                    <el-col :span="12">
                        <el-form-item label="物料号：">
                            <el-input v-model="form.sort" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="规格：">
                            <el-input v-model="form.sort" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="器具名称：">
                            <el-input v-model="form.sort" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="数量：">
                            <el-input v-model="form.sort" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="统一编号：">
                            <el-input v-model="form.sort" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                        <el-form-item label="样品分码：">
                            <el-input v-model="form.name" disabled style="width: 200px;"></el-input>
                            <el-input v-model="form.name" disabled style="width: 200px;"></el-input>
                            <el-button type="primary" size="small" @click="previewFile">查看</el-button>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="检测结论：">
                            <el-input v-model="form.sort" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                        <el-form-item label="检测附件：">
                            <el-input v-model="form.name" disabled style="width: 200px;"></el-input>
                            <el-button type="primary" size="small" @click="previewFile">查看</el-button>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="工号/检测人：">
                            <el-input v-model="form.sort" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="检测时间：">
                            <el-input v-model="form.sort" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="审核结果：">
                            <el-radio-group v-model="form.name">
                                <el-radio :label="3">同意</el-radio>
                                <el-radio :label="6">不同意</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                        <el-form-item label="审核意见：">
                            <el-input type="textarea" v-model="form.sort" style="width: 522px;"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="工号/审核人：">
                            <el-input v-model="form.sort" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="审核时间：">
                            <el-input v-model="form.sort" disabled></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="是否为专用检具：" label-width="140px">
                            <el-radio-group v-model="form.name">
                                <el-radio :label="3">是</el-radio>
                                <el-radio :label="6">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="是否进行偏差申请：" label-width="140px">
                            <el-radio-group v-model="form.name">
                                <el-radio :label="3">是</el-radio>
                                <el-radio :label="6">否</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
            <!-- 文件夹文件预览 -->
            <file-preview :show="showFile"></file-preview>
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
                <el-button @click="dialogVisible = false">取 消</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>
    import FilePreview from 'dialog/wait-test-tool-manage/apply-test-return/file-preview';
    export default {
        components: {
            'file-preview': FilePreview
        },
        data() {
            return {
                dialogVisible: this.show,
                form: {
                    sort: '',
                    name: ''
                },
                resultval: '',
                result: [{
                        value: '合格',
                        label: '合格'
                    }, {
                        value: '不合格',
                        label: '不合格'
                    }],
                showFile: false
            }
        },
        props: {
            show: {
                type: Boolean,
                default: false
            }
        },
        watch: {
            show() {
                this.dialogVisible = this.show;
            }
        },
        methods: {
            handleClose() {
                this.dialogVisible = false;
            },
            // 文件预览
            previewFile() {
                this.showFile = true;
            }
        }
    }
</script>